/** * Created by Administrator on 2018-12-4. */public class TraditionalThreadCommunication {    public static void main(String[] args) {       Business business = new Business();        new Thread(new Runnable() {            @Override            public void run() {                for (int j = 1; j <= 50; j++) {                  business.sub(j);                }            }        }).start();        for (int j = 1; j <= 50; j++) {                 business.main(j);        }    }}    class Business{        public synchronized void sub(int j){             for (int i = 1; i <=10; i++) {                            System.out.println("sub sequence of " + i + "loop of " + j);                        }        }         public synchronized void main(int j){             for (int i = 1; i <=100; i++) {                            System.out.println("main sequence of " + i + "loop of " + j);                        }        }    }